package org.hilo.boot.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.UpdateProvider;

import tk.mybatis.mapper.annotation.RegisterMapper;

/**
 * 通用Mapper接口,更新
 *
 * @author zollty
 */
@RegisterMapper
public interface UpdateByIdsMapper<T> {


    /**
     * 根据主键更新属性不为null的值
     *
     * @param record
     * @param ids 如 "1,2,3,4"
     * @return
     */
    @UpdateProvider(type = IdBatchProvider.class, method = "dynamicSQL")
    @Options(useCache = false, useGeneratedKeys = false)
    int updateByIds(@Param("record") T record, @Param("list") List<?> ids);
    
}
